Closed Bug 1737093 Opened 4 years ago Closed 4 years ago

SanitizeRenderer.cpp: the 'empty' method should be used to check for emptiness instead of 'size'

Categories

(Developer Infrastructure :: Source Code Analysis, task)

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: Sylvestre, Assigned: vishal.vikal.88, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++])

Attachments

(1 file, 2 obsolete files)

Filling as a good first bug to learn workflows.

if (!m.str(1).size()) {
should use .empty() instead

https://searchfox.org/mozilla-central/rev/489e82dcc1e5afbe691ff3b1c982382914637e38/dom/canvas/SanitizeRenderer.cpp#184

As the change is trivial, it is just to learn how to contribute to Firefox.

Found by http://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Mentor: sledru
Keywords: good-first-bug
Whiteboard: [lang=C++]
Blocks: 1737096
No longer blocks: 1737096

Depends on D129803

Assignee: nobody → vishal.vikal.88
Status: NEW → ASSIGNED
Attached file Bug 1737093 fix mistake r?sylvestre (obsolete) —

Depends on D129943

Attachment #9248491 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Depends on D129941

Attachment #9249611 - Attachment is obsolete: true
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: